package org.jeecg.modules.payment.enums;

/**
 * 支付平台
 * 第三方 bmwl
 * 支付宝
 * 微信
 */
public enum CuPaymentPlatformEnum {
    BMWLPLAT("bmwl", "第三方", "/jeecg-boot/bmwl/notice"),
    ALIPAYPLAT("alipay", "支付宝", "/jeecg-boot/bmwl/notice"),
    WECHATPLAT("wxpay", "微信", "/jeecg-boot/bmwl/notice");

    private String code;
    private String name;

    private String notifyUrl;

    CuPaymentPlatformEnum(String code, String name, String notifyUrl) {
        this.code = code;
        this.name = name;
        this.notifyUrl = notifyUrl;
    }

    public static CuPaymentPlatformEnum fromCode(String code) {
        for (CuPaymentPlatformEnum paymentPlatformEnum : CuPaymentPlatformEnum.values()) {
            if (paymentPlatformEnum.getCode().equals(code)) {
                return paymentPlatformEnum;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNotifyUrl() {
        return notifyUrl;
    }

    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }
}
